<div class="row">
<div id="twelve columns" class="panel">
    <?php echo anchor("users/newuser", 'New'); ?>
    <br><br>
    <table width="100%">
      <thead>
        <tr>
        <?php
           $keys= array_keys($users[0]);
           
           for($i=0;$i<count($keys);$i++)
           {
             echo "<th> ".$keys[$i]."</th>";
           }
        ?>
        </tr>
      </thead>
      <tbody>
        <?php
         foreach ($users as $item)
         {
           echo "<tr>";
           $i=0;
           foreach ($item as $row)
           {
              if($i==0)
              {
                echo "<td>";
                echo anchor("users/profile/$row",$row);
                echo "</td>";
              }
              else
              {
              echo "<td>".$row."</td>";
              }
            $i++;
           }
           echo "</tr>";
         }
         ?>
      </tbody>
      
    </table>
</div>
</div>